import LoadingMask from './loading'
const loading = {
  install (Vue) {
    const LoadingCase = Vue.extend(LoadingMask)
    // 创建组件实例
    const loadingComponent = new LoadingCase()
    document.body.appendChild(loadingComponent.$mount().$el)
    Vue.prototype.$ShowLoading = () => {
      loadingComponent.isShow = true
    }
    Vue.prototype.$hideLoading = () => {
      loadingComponent.isShow = false
    }
  }
}

export default loading
